package com.zdth.ding.cron;

import com.zdth.ding.serivce.DingBootPush;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author Z-7
 * @Date 2022/9/21
 */
@Slf4j
@Component
public class DingAutoSend {
    @Autowired
    private DingBootPush dingBootPush;

    @Scheduled(cron = "0 0/5 * * * ?")
    public void sendPic() {
        log.info("开始发送DingTalk");
        dingBootPush.sendMessage();
        log.info("发送结束DingTalk");
    }
}
